import in_page from "./in_page/in_page_mutaion.js"

let _this = {
  get_user_info(state,obj){
    state.user_info = obj
  },
  M_BottomClick(id) {
    //前一次的点击按钮的状态改变
    state.BottomBtn[BottomBtn_pre_click].click = false
    //当前点击的状态改变
    state.BottomBtn[id].click = true
  },
  redirect(state, payload) {
    state.footer_menu_list
  },
  //出库 bottom_btn style change
  bottom_btn_f (state,obj) {
    state.bottom_btn[state.pre_bottom_click].c_sign = false;
    state.bottom_btn[obj.index].c_sign = true;
    state.pre_bottom_click = obj.index;
  },
  Loading_show(state){
    conosle.log(")_)_)_)_)_)_)_)_)_)_)______________)))))))))))))_))))))))))")
    console.log(state.Loading_show)
    state.Loading_show
  },
  close_loading_mask(state){
    state.Loading_show = false
  },
  show_loadin_mask(state){
    state.Loading_show = true
  },
  Change_loading_show(state){
    // if( state.Loading_show == false){
    //   state.Loading_show = true
    // }
    state.Loading_show = !state.Loading_show
  },
  //in page get_mess secondary_category
  //改变in 的bottom_btn
  Change_bottom_btn(state,obj){
    let new_obj = {};
    //nor
    for(let x = 0;x < 8; x++) {
      if( x == 7 ){
        new_obj[x+1] = {c_sign:false,text:"其他",del:false,index:x+1,other:{},id:obj[x].id}
        break;
      }
      if( x == 0 ){
        new_obj[x+1] = {c_sign:true,text:obj[x].name,del:false,index:x+1,id:obj[x].id}
        continue;
      }
      new_obj[x+1] = {c_sign:false,text:obj[x].name,del:false,index:x+1,id:obj[x].id}
    }
    //other
    for(let x = 8 ;x < obj.length ;x++){
      new_obj[8].other[x] = {c_sign:false,text:obj[x].name,del:false,index:x+1,id:obj[x].id}
    }
    //state change
    state.bottom_btn = new_obj
  }
}
Object.assign(_this,in_page)
export default _this
